Skip to content

fix pydantic v2 wrap validators and silence deprecation warning#9

Merged
Centurix merged 2 commits into
Centurix:masterfrom
nseetim:fix/pydantic-v2-validator-warning
May 9, 2026
Merged

fix pydantic v2 wrap validators and silence deprecation warning#9
Centurix merged 2 commits into
Centurix:masterfrom
nseetim:fix/pydantic-v2-validator-warning

Conversation

@nseetim

@nseetim nseetim commented May 7, 2026

Copy link
Copy Markdown
Contributor

Return validated instances from DANJAResource/DANJAResourceList wrap validators to comply with Pydantic v2 expectations and avoid the "return self" warning.
Add regression tests for single/list resources with included payloads, and update resource id resolution to access model_fields from the model class to remove v2.11 deprecation warnings.

Fixes This currently open issue

nseetim added 2 commits May 7, 2026 08:21
Return validated instances from DANJAResource/DANJAResourceList wrap
validators to comply with Pydantic v2 expectations and avoid the
"return self" warning.
Add regression tests for single/list resources with included payloads,
and update resource id resolution to access model_fields from the
model class to remove v2.11 deprecation warnings.
@Centurix Centurix merged commit ce95a16 into Centurix:master May 9, 2026
@Centurix

Centurix commented May 9, 2026

Copy link
Copy Markdown
Owner

Thanks, that's a good solution and the regression works like a charm. Nice one.

@Centurix Centurix mentioned this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants